package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 商品评价表
    */
@Document(indexName = "productevaluation")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductEvaluation {
    /**
    * 评价ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 用户ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer userId;

    /**
    * 商品ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer productId;

    /**
    * 评价内容
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String content;

    /**
    * 图片组ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer imageGroupId;

    /**
    * 时间
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date createTime;
}